/*
 * @Author: your name
 * @Date: 2021-04-05 15:27:53
 * @LastEditTime: 2021-04-20 16:12:33
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \chronic-back-end\module\consultMod\main.go
 */
package consultMod

import (
	"chronic/module/userMod"

	"github.com/gin-gonic/gin"
)

/*Module 咨询模块 */
func Module(app *gin.Engine) {
	module := app.Group("/consult")
	module.POST("/add", userMod.Allow(userMod.Patient, userMod.Admin), consult)
	module.GET("/history", userMod.Allow(), getHistory)
	module.GET("/allConsult", userMod.Allow(userMod.Admin), getAllConsult)
	module.GET("/consultsByUserId", userMod.Allow(userMod.Admin), getconsultsByUserId)
	module.GET("/consultsByOther", userMod.Allow(userMod.Admin), getconsultsByOther)
	module.DELETE("/admin/consult", userMod.Allow(userMod.Admin), deleteConsult)
}
